### `preview_entity_cache`

<ExpansionPanel title="preview_entity_cache YAML snippet">

```yaml title="preview_entity_cache"
preview_entity_cache:
  enabled: false
  expose_keys_in_context: false
  invalidation:
    concurrent_requests: 10
    listen: example_listen
    path: example_path
    scan_count: 1000
  metrics:
    enabled: false
    separate_per_type: false
    ttl: 30s
  subgraph:
    all:
      enabled: true
      invalidation:
        enabled: false
        shared_key: ''
      private_id: null
      redis:
        namespace: example_namespace
        password: example_password
        pool_size: 1
        required_to_start: false
        reset_ttl: true
        timeout: null
        tls:
          certificate_authorities: null
          client_authentication:
            certificate_chain: example_certificate_chain
            key: example_key
        ttl: null
        urls:
        - http://example.com/urls_item
        username: example_username
      ttl: 30s
    subgraphs: {}
```

</ExpansionPanel>

When using Redis as the cache backend, the router emits additional Redis-specific metrics to help monitor cache performance:

- **Connection metrics**: Track Redis connection establishment and health
- **Command metrics**: Monitor Redis command execution, queue length, and redelivery counts  
- **Performance metrics**: Measure average latency, network latency, and request/response sizes
- **Operational metrics**: Help identify connection issues, network problems, or performance bottlenecks

These metrics use the `kind` attribute to distinguish between different Redis cache uses (e.g., `entity`). For the complete list of Redis metrics and their descriptions, see the [Redis Cache metrics documentation](/router/configuration/telemetry/instrumentation/standard-instruments/#redis-cache).
